/*
 *  Copyright 2008 Danny Lagrouw
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License. 
 */
package org.bastion.example.domain.service;

import java.util.List;
import java.util.Set;

import org.bastion.example.domain.Amount;
import org.bastion.example.domain.Period;
import org.bastion.example.domain.Vehicle;
import org.bastion.example.domain.VehicleType;

/**
 * Usecase: Get a quote for a vehicle. <br>
 * <li>user asks for a list of vehicle types;
 * <li>user chooses a vehicle type;
 * <li>system shows vehicles for chosen type;
 * <li>user chooses a vehicle and specifies rental period;
 * <li>system shows a quote for the vehicle over that period.
 * 
 * @author Danny Lagrouw
 */
public class GetQuote {

	/**
	 * Retrieve a list of vehicle types.
	 * 
	 * @return
	 */
	public List<VehicleType> getVehicleTypes() {
		return VehicleType.getVehicleTypes();
	}

	/**
	 * Retrieve a list of vehicles for the specified vehicle type.
	 * 
	 * @param vehicleType
	 * @return
	 */
	public Set<Vehicle> getVehicles(VehicleType vehicleType) {
		return vehicleType.getVehicles();
	}

	/**
	 * Give a quote for the specified vehicle over the period.
	 * 
	 * @param vehicle
	 * @param period
	 * @return
	 */
	public Amount getQuote(Vehicle vehicle, Period period) {
		return vehicle.getQuote(period);
	}

}
